package cn.edu.scnu.semart.vo.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(description = "用户注册信息")
public class UserRegisterVo {

    @NotBlank
    @ApiModelProperty(value = "用户名", required = true, example = "cww")
    private String username;

    @NotBlank
    @ApiModelProperty(value = "密码", required = true, example = "123456")
    private String password;

    @Email
    @ApiModelProperty(value = "邮箱", required = true, example = "2971986577@qq.com")
    private String email;

    @NotBlank
    @ApiModelProperty(value = "手机号", required = true, example = "17875810251")
    private String phone;

    @NotBlank
    @Pattern(regexp = "^(NORMAL|ADMIN)$", message = "用户类型只能是 NORMAL 或 ADMIN")
    @ApiModelProperty(value = "用户类型", required = true, example = "NORMAL")
    private String userType;
}